package alipay.openplatform.edu.campus.jiuye.dao.mappers.user;

import alipay.openplatform.edu.campus.jiuye.model.po.UserAndTopicPO;
import alipay.openplatform.edu.campus.jiuye.model.po.UserTopicInfoPO;
import alipay.openplatform.edu.campus.jiuye.model.po.UserTopicInfoKeyPO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserTopicInfoMapper {
//    int deleteByPrimaryKey(UserTopicInfoKeyPO key);

    int insert(UserTopicInfoPO record);

    int insertSelective(UserTopicInfoPO record);

    UserTopicInfoPO selectByPrimaryKey(UserTopicInfoPO key);

    UserTopicInfoPO selectIfExist(Map map);

    int updateByPrimaryKeySelective(UserTopicInfoPO record);

    int cancelTopic(UserTopicInfoPO record);

    Integer getMyTopicInfoCount(String userId);

    List<UserAndTopicPO> getMyTopicInfoByPage(@Param("userId") String userId);

    UserTopicInfoPO selectUserTopicInfo(@Param("userId") String userId,
                                        @Param("topicId") Integer topicId,
                                        @Param("cityId") String cityId);

    UserTopicInfoPO selectSchoolTopicInfo(@Param("userId") String userId,
                                          @Param("topicId") Integer topicId,
                                          @Param("schoolId") String schoolId,
                                          @Param("cityId") String cityId );


    List<UserAndTopicPO> querySmsUserTopicInfo(@Param("topicId") Integer topicId);

    int updateSmsByPrimaryKey(@Param("topicId") Integer topicId);

    int querySmsIfSend(@Param("userId") String userId, @Param("topicId") Integer topicId);

    int updateIfSMS(@Param("userId") String userId, @Param("topicId") Integer topicId);

    int updateTopic(Map map);

}